package hk.linkcredit.awardservice.award.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import hk.linkcredit.awardservice.award.mapper.SysConfigMapper;
import hk.linkcredit.awardservice.award.service.ISysConfigService;
import hk.linkcredit.awardservice.award.domain.entity.SysConfig;
import org.springframework.stereotype.Service;

/**
 * 参数配置Service业务层处理
 *
 * @author african-loan
 * @date 2022-07-06
 */
@Service
public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig> implements ISysConfigService {

    @Override
    public String selectConfigByKey(String key) {
        return getOne(new QueryWrapper<SysConfig>().eq("config_key", key)).getConfigValue();
    }
}
